package com.gooapple.notepad.util;

import com.gooapple.notepad.constant.Constant;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;

public class SongNotificationUtils {
	public static final int NF_SCAN_START = 1;
	public static final int NF_SCAN_FINISHED = 2;
	
	public static void sendNotification(Context context, int icon,
			CharSequence tickerText, long when) {
		Notification notification = new Notification(icon, tickerText, when);

		NotificationManager notificationManager = (NotificationManager) context
				.getSystemService(Context.NOTIFICATION_SERVICE);
		
		Intent intent = new Intent(Constant.ACTION_SONG_PLAYER);
		PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);
		
		notification.setLatestEventInfo(context, "scan title", "scan start", pendingIntent);
		
		System.out.println("nofity!!!!!!!!");
		notificationManager.notify(NF_SCAN_START, notification);
	}
}
